package com.sky.service;

import com.sky.dto.ShoppingCartDTO;
import com.sky.entity.ShoppingCart;
import com.sky.result.Result;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author guozh
 */
@Service
public interface ShoppingCartService {
    /**
     * 添加购物车
     *
     * @param shoppingCartDTO 购物车数据
     */
    void addShoppingCart(ShoppingCartDTO shoppingCartDTO);

    /**
     * 查看购物车数据
     *
     * @return Result<List < ShoppingCart>>
     */
    List<ShoppingCart> findShoppingCartList();

    /**
     * 清空购物车
     */
    void cleanShoppingCartList();

    /**
     * 删除的购物车
     *
     * @param shoppingCartDTO 删除的购物车数据
     */
    void deleteShoppingCar(ShoppingCartDTO shoppingCartDTO);
}
